package com.company.cloud.sdk.modules.service.impl;

import com.company.cloud.sdk.core.config.WxApiConfig;
import com.company.cloud.work.modules.sdk.api.WorkWxApi;
import com.company.cloud.work.modules.sdk.request.GetUserListReq;
import com.company.cloud.work.modules.sdk.request.GetUserReq;
import com.company.cloud.work.modules.sdk.response.WxUserInfoResponse;
import com.company.cloud.work.modules.sdk.response.WxUserListResponse;
import com.company.cloud.sdk.modules.service.WorkWxSdkService;
import org.springframework.stereotype.Service;

@Service
public class WorkWxSdkServiceImpl implements WorkWxSdkService {

    @Override
    public String getAccessToken(WxApiConfig wxConfig) {
        return WorkWxApi.getToken(wxConfig);
    }

    @Override
    public WxUserListResponse getUserList(GetUserListReq param) {
        return WorkWxApi.getUserList(param);
    }

    @Override
    public WxUserInfoResponse getUser(GetUserReq param) {
        return WorkWxApi.getUser(param);
    }
}
